feat(#622): structure the ci discord alert and document the alarms format - #695
Merged
Conversation
Give the alarms channel one scannable embed: a `[source] severity — what fired` title, one investigation link, and a severity colour. Axiom moves to two custom-webhook notifiers (critical, warning) posting the canonical embed with a recovery colour on clear; CI's alert job builds the same shape. Bugsink stays its stock format — its messaging service exposes no templating. Documents the format and palette in observability.md, and notes the Bugsink exception in its README.
📝 WalkthroughWalkthroughThe PR introduces severity-specific Axiom Discord notifiers and a shared canonical embed renderer, aligns CI failure alerts with the critical embed format, and documents alarm sources, severity colors, provisioning, and Bugsink’s fixed Discord message shape. ChangesCanonical alarm notifications
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@infra/axiom.ts`:
- Line 101: Update the alarmsWebhookHeaders declaration to use an as const
assertion, making its shared webhook configuration properties readonly while
preserving the existing header values.
- Around line 300-310: Update the URL field in buildAlarmsWebhookBody to target
the organization-scoped Axiom monitor view, incorporating the template’s
.MonitorID value instead of linking to the console home.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: abc31823-6a1d-4e21-a2c3-81030a370d7e
📒 Files selected for processing (6)
.github/workflows/main.ymlapps/bugsink/README.mddocs/architecture/platform/deployment.mddocs/architecture/platform/observability.mdinfra/axiom.tsinfra/index.ts
Axiom's custom-webhook notifier is plan-gated (the notifiersCustomWebhook feature returns a 400), so it can't carry the canonical embed without a relay. Revert Axiom to its stock discordWebhook notifier; the CI structured embed and the documented alarms format stay. Axiom's adoption is captured as a follow-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #622
Give the alarms Discord channel a scannable alert from the one source that exposes a configurable body — CI — and record the format and the tool limits of the others.
alertjob posts a structured embed: a[CI] critical — …title, the run link, a "Failed jobs" field, and a red severity colour (#e5484d/15026253).discordWebhookformat: its custom-webhook notifier (the only templated body it offers) is plan-gated —pulumi upagainst prod returns400 feature not enabled: notifiersCustomWebhook. Adoption once enabled is captured in feat: post the canonical alarms embed from axiom via custom-webhook #697 with the full implementation.Testing
bun run lintpassespulumi previewagainst prod is a no-op (17 unchanged) — infra-drift stays greenbun run test— no tests touchedContext
The custom-webhook approach was built and applied against prod; the apply surfaced the plan gate (creates failed, no delete ran, alerting path untouched). Reverting Axiom to stock keeps the branch a no-op against live infra. The parked implementation lives in #697.